/**
 * 个人中心API
 */
import { request } from '@/utils/request'

// 个人中心API
export const personalCenterApi = {
  // 获取个人资料
  getProfile: () => {
    return request.get('/auth/personal-center/profile/')
  },
  
  // 更新个人资料
  updateProfile: (data: any) => {
    return request.put('/auth/personal-center/update_profile/', data)
  },
  
  // 修改密码
  changePassword: (data: any) => {
    return request.post('/auth/personal-center/change_password/', data)
  },
  
  // 获取登录历史
  getLoginHistory: () => {
    return request.get('/auth/personal-center/login_history/')
  },
  
  // 获取个人统计信息
  getStatistics: () => {
    return request.get('/auth/personal-center/statistics/')
  },

  // 获取个人偏好设置
  getPreferences: () => {
    return request.get('/auth/personal-center/preferences/')
  },

  // 保存个人偏好设置
  savePreferences: (data: any) => {
    return request.post('/auth/personal-center/save_preferences/', data)
  }
}
